#ifndef _OH_COMPUTER_H
#define	_OH_COMPUTER_H
/*******************************************************************************
 **  Name: computer.h                                                         **
 **  Description:                                                             **
 **                                                                           **
 **  CDDL: Open Source Initiative (OSI) Approved License                      **
 **                                                                           **
 **  Copyright (c) 2009-2010 Barry "Gian" James  <bjames@munixos.net>         **
 **  All rights reserved.                                                     **
 **                                                                           **
 **  The contents of this file are subject to the terms of the CDDL:          **
 **  Common Development and Distribution License (the "License").             **
 **  You may not use this file except in compliance with the License.         **
 **                                                                           **
 **  You can obtain a copy of the license at $PROJECT_ROOT/LICENSE            **
 **  or http://www.opensolaris.org/os/licensing.  This code is Open Source    **
 **  and you are free to use it within the confines of the license, even      **
 **  for your own closed-source commercial projects, as long as you follow    **
 **  the terms set forth in the CDDL.                                         **
 **                                                                           **
 **  When distributing Covered Code, include this CDDL HEADER in each         **
 **  file and include the License file at $PROJECT_ROOT/LICENSE.              **
 **  If applicable, add the following below this CDDL HEADER, with the        **
 **  fields enclosed by brackets "[]" replaced with your own identifying      **
 **  information: Portions Copyright [yyyy] [name of copyright owner]         **
 **                                                                           **
 ******************************************************************************/
// Modified $DateTime$ by $Author$
#define _computer_h_ID    "$Id$"

#include "component.h"

enum class cpuType { core, target, defense, secondary };
#define Kilobyte    1
#define Megabyte    2
#define Gigabyte    3
#define Terabyte    4
enum class MemType { Flash, RAM };
struct Memory
{
    MemType     type;
    uint8       density;    // eg 64, 256, 512, 8
    uint8       multiplier;  // eg K, M, G, T
};

class Computer : public Component
{
public:
    Computer();
    explicit Computer(const char * c);
    Computer(const Computer& orig);
    ~Computer();

private:
    cpuType     ctype;
    uint8       ips;        // instructions per second
    uint8       maxMem;     // memory ceiling
    uint8       maxCodeSz;  // max size of compiled EON code
    Memory      mem;
};


// TODO i gotta really rework the names of these computer systems
#define CPU_512B_STD
#define CPU_VON_NEUMANN
#define CPU_CLUSTERED
#define CPU_NEURAL_NET
#define CPU_BOAST               // Binary Open Architecture System Typing
#define CPU_TOAST               // Ternary ''     ''
#define CPU_QUANTUM_SLIP

// Targeting
#define CPU_TGT_STA6563         // std STA cpu
#define CPU_TGT_ALCGS           // Adaptive Logic Combat Guidance System


#define CPU_DEF_INTRUSION
#define CPU_DEF_ACTIVE_DENIAL   // active denial system
#define CPU_DEF_CLOAKING
#define CPU_DEF_WAVEBUBBLE      // destroys communications/jammer
#define CPU_DEF_HOLOGRAM

#endif	/* _OH_COMPUTER_H */

